← Back to issue list

inconsistent to arch behaviour

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1835638
Type
issue
State
open
Author
~ondrak
Labels
Created
2019-07-07 00:12:45.895813+00:00
Updated
2019-07-07 00:12:45.895813+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

snapcraft version: 3.6 Inconsistent behaviour when -to <arch> is used for stage packages Behaviour this feature is unpredictable and inconsistent least to say as examples demonstrate Following works correctly when cross compiling on amd64 to arm stage-packages: - on amd64: - to armhf: - iproute2:armhf - netplan.io:armhf - systemd:armhf - to arm64: - iproute2:arm64 - netplan.io:arm64 - systemd:arm64 - else: - iproute2 - netplan.io - systemd however it magically fails when building natively as it does not pull in required packages (tested on amd64 and arm) Further more adding - else statement under 'on amd64' breaks even arm cross build on amd64 as it pulls portion of the packages for arm and other portion for amd64 stage-packages: - on amd64: - to armhf: - iproute2:armhf - netplan.io:armhf - systemd:armhf - to arm64: - iproute2:arm64 - netplan.io:arm64 - systemd:arm64 - else: - iproute2 - netplan.io - systemd - else: - iproute2 - netplan.io - systemd Attempt to use more generic definition like following: stage-packages: - to armhf: - iproute2:armhf - netplan.io:armhf - systemd:armhf - to arm64: - iproute2:arm64 - netplan.io:arm64 - systemd:arm64 - to amd64: - iproute2:amd64 - netplan.io:amd64 - systemd:amd64 This actually works well when cross building, but fails spectacularly when building natively as it does not pull in required packages All around using 'on <arch>' or 'to <arch>' seems to produce highly unpredictable results test snap build here https://launchpad.net/~ondrak/+snap/netplan-test

Evaluation history

No evaluation history available.